/**
 Created by sunhao on 2016/4/21.
 */
//咨询中心省略内容
var text = $('.news-list ul li p'), str = '', textLength = 125;
text.each(function () {
    str = $(this).html();
    console.log(textLength);
    if (str.length > textLength) {
        $(this).html(str.substring(0, textLength) + "... ...")
    }
});

// 动态获得分页距离
// 使得页脚居中
var lis = $('.pages ul').children('li'),width = 0;
lis.each(function(){
    width = width + parseInt(this.clientWidth) + 16
});
$('.pages ul').attr('style','width:' + width + 'px');